package com.dengqi.mymodule.activity.popupwindow;

import android.content.Context;
import android.view.View;

import com.dengqi.mymodule.R;


public class CustomPopupWindow extends CommonPopupWindow {

    private LayoutGravity layoutGravity;

    public CustomPopupWindow(Context c) {
        super(c, R.layout.dialog_message, 50, 100);
    }


    @Override
    protected void initView() {
        layoutGravity = new LayoutGravity(LayoutGravity.ALIGN_RIGHT);
        contentView.setBackgroundResource(R.color.black);
    }

    @Override
    protected void initEvent() {

    }

    public void setHoriGravity(int gravity){
        layoutGravity.setHoriGravity(gravity);
    }

    public void setVertGravity(int gravity){
        layoutGravity.setVertGravity(gravity);
    }

    public void show(View anchor){
        showBashOfAnchor(anchor, layoutGravity, 0, 0);
    }
}
